<!DOCTYPE HTML>
<html>

	<head>
		<style type="text/css"></style>
		<meta content="no-siteapp" http-equiv="Cache-Control">
		<link media="handheld" rel="alternate">
		<!-- end 云适配 -->
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
		<title>我收藏的职位-城建就业指导网</title>
		<link href="${rc.contextPath}/bootstrap/css/bootstrap.css" rel="stylesheet">
		<link href="${rc.contextPath}/css/style.css" type="text/css" rel="stylesheet">
		<script type="text/javascript" src="${rc.contextPath}/js/jquery.1.10.1.min.js"></script>
		<script src="${rc.contextPath}/js/jquery.lib.min.js" type="text/javascript"></script>
		<script src="${rc.contextPath}/bootstrap/js/bootstrap.min.js"></script>
		<!--[if lte IE 8]>
		    <script type="text/javascript" src="style/js/excanvas.js"></script>
		<![endif]-->
	</head>

	<body>
		<div id="body">
		
			#parse("header.html")
			
			<!-- end #header -->
			<div id="container">

				<div class="clearfix">
					<div class="content_l">
						<dl class="c_collections">
							<dt>
		                        <h1><em></em>我收藏的职位</h1>
		                    </dt>
							<dd>
								<form id="collectionsForm">
									<ul class="reset my_collections">
										#foreach($!job in $!collectionJobList)
										<li data-id="$!job.id">
											
											<div class="co_item">
												<h2 title="$!job.job_name">
	                                        <a target="_blank" href="${rc.contextPath}/job/detail/$!job.id">
	                                        	<em>$!job.job_name</em> 
	                                        	<span>（$!{job.job_salary_min}k-$!{job.job_salary_max}k）</span>
	                                    	</a>
	                                    </h2>
												<span class="co_time">发布时间：$!job.gmt_create</span>
												<div class="co_cate">$!{job.location_name} / 
												#if($!job.job_request_worktime == 0)
												不限
												#end
												#if($!job.job_request_worktime == 1)
												应届毕业生
												#end
												#if($!job.job_request_worktime == 2)
												1年以下
												#end
												#if($!job.job_request_worktime == 3)
												1-3年
												#end
												#if($!job.job_request_worktime == 4)
												3-5年
												#end
												#if($!job.job_request_worktime == 5)
												5-10年
												#end
												#if($!job.job_request_worktime == 0)
												10年以上
												#end
												 / 
												 #if($!job.job_request_edubackground == 0)
												不限
												#end
												#if($!job.job_request_edubackground == 1)
												专科
												#end
												#if($!job.job_request_edubackground == 0)
												本科
												#end
												#if($!job.job_request_edubackground == 0)
												硕士
												#end
												#if($!job.job_request_edubackground == 0)
												博士
												#end
												 </div>
												<span class="co_youhuo c7">$!job.job_brief</span>
												<a class="collectionCancel collection_link collected" href="javascript:;" data-id="$!job.id">
													取消收藏
													<span>已取消收藏</span>
												</a>
											</div>
										</li>
										#end
									</ul>
									
									<div class="pagination" style="margin: 0px 0 20px;">$!page.pageString</div>
								</form>
							</dd>
						</dl>
					</div>
					<div class="content_r">
						<div class="mycenterR" id="myInfo">
							<h2>我的信息</h2>
							<a href="${rc.contextPath}/user/collection/job/1">我收藏的职位</a>
							<br>
							<a target="_blank" href="${rc.contextPath}/user/collection/company/1">我关注的公司</a>
						</div>
						
					</div>
				</div>
				
				<div class="clear"></div>
				<a rel="nofollow" title="回到顶部" id="backtop"></a>
			</div>
			<!-- end #container -->
		</div>
		<!-- end #body -->


		<!--  -->

	</body>
	
<script type="text/javascript">

$(document)
.on(
		"click",
		".pagination a",
		function(e) {
			var pageNum = $(this).attr("pageData");
			if (pageNum == 0 || isNaN(pageNum)) {
				return;
			}
			
			window.location.href = "${rc.contextPath}/user/collection/job/"+ pageNum ;
		});
		
$(".collectionCancel").click(function(){
	if(confirm("确认取消收藏？")){
		jQuery.getJSON('${rc.contextPath}/user/cancelcollect/job?id='+$(this).data("id"),function(data){
			if(data.code == 200){
				alert(data.info);
				location.reload();
			}else if(data.code == 405){
				alert(data.info);
				window.location.href = "${rc.contextPath}/login";
			}else{
				alert(data.info);
			}
		})
	}
});
</script>

</html>